<?php

require_once dirname(__FILE__).'/../lib/Json/AIS_JsonRPCServer.php';

/**
 * Simple Class for the test
 */
class Test
{
	/**
	 * Und ich bin a
	 * @var string
	 * @pattern /^[a-zA-Z]+$/
	 */
	public $a;
	/**
	 * Ich bin b
	 * @var int
	 */
	public $b;
}
/**
 * A simple TestService
 */
class TestService
{
	/**
	 * 
	 * @return Test
	 * @param Test $a
	 * @param int $b
	 * @maximum $b 500
	 */
	public function test($a, $b)
	{
		$t = new Test();
		$t->a = "Hello World";
		$t->b = $b + $a->b;
		return $t;
	}
	
}

$server = new AIS_JsonRPCServer();
$server->serve("TestService");

?>